﻿using System;
using System.Linq;
using Melee.DataContract.Views;
using Melee.Models.Entity;

namespace Melee.DataContract.Extension
{
    public static class PlayerExtensionMethod
    {
        public static PlayerView ConvertToPlayerView(this Player player)
        {
            PlayerView view = new PlayerView()
            {
                Name = player.Name,
                NickName = player.NickNameAttribute.Name,
                Img = string.Format("images\\player\\{0}", player.Img)
            };
            return view;
        }
    }
}
